// __PUBLIC__/js/page/cms/create/create_cate
require(['../../common'], function() {
  require(['create.create'])
})

define('create.create', [
  'jquery',
  'css!jqp/nprogress.css',
  'jqp/nprogress',
], function($, css, NProgress) {
  'use strict';

  NProgress.configure({
    showSpinner: false
  })

  NProgress.start()

  // var url = APP + '?app=cms&m=Create&a=createProgress'

  // function progress() {
  //   $.getJSON(url)
  //   .done(function(data) {
  //     if (data.current === data.total) {
  //       NProgress.done()
  //     } else {
  //       NProgress.inc()
  //       setTimeout(progress, 500)
  //     }
  //   })
  // }

  window.control = function(total, currentj, count, t) {
    if (currentj === count) {
      NProgress.done()
    } else {
      NProgress.inc()
    }
  }

})
